﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:Lithnet.Transforms.Presentation"
                    xmlns:t="clr-namespace:Lithnet.Transforms;assembly=Lithnet.Transforms"
                    xmlns:core="clr-namespace:Lithnet.Common.Presentation;assembly=Lithnet.Common.Presentation">

    <DataTemplate  DataType="{x:Type vm:MVBooleanToBitmaskTransformViewModel}">
        <StackPanel>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Content="Default value if target is null"
                       Grid.Row="0"
                       Grid.Column="0" />
                <TextBox Text="{Binding DefaultValue, ValidatesOnDataErrors=True, ValidatesOnExceptions=true}"
                         Grid.Row="0"
                         Grid.Column="1"
                          />

                <Label Content="Ordered list of flag values to apply"
                       Grid.Row="1"
                       Grid.Column="0" />

                <DataGrid AutoGenerateColumns="True"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          ItemsSource="{Binding Path=Flags, ValidatesOnDataErrors=True, ValidatesOnExceptions=true}"
                          Grid.Row="2"
                          Grid.Column="1"
                          CanUserAddRows="true"
                          CanUserDeleteRows="true"
                          MinHeight="100"
                          Margin="0,5,0,5">
                    
                    <!--<DataGrid.Columns>
                        <DataGridTextColumn Header="Value"
                                            Binding="{Binding Path=CurrentValue,ValidatesOnDataErrors=True,ValidatesOnExceptions=true}"
                                            Width="Auto">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextWrapping"
                                            Value="Wrap" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            <DataGridTextColumn.EditingElementStyle>
                                <Style TargetType="TextBox">
                                    <Setter Property="TextWrapping"
                                            Value="Wrap" />
                                    <Setter Property="AcceptsReturn"
                                            Value="true" />
                                </Style>
                            </DataGridTextColumn.EditingElementStyle>
                        </DataGridTextColumn>

                        <DataGridTextColumn Header="Output value"
                                            Binding="{Binding Path=NewValue,ValidatesOnDataErrors=True,ValidatesOnExceptions=true}"
                                            Width="Auto">
                            <DataGridTextColumn.ElementStyle>
                                <Style TargetType="TextBlock">
                                    <Setter Property="TextWrapping"
                                            Value="Wrap" />
                                </Style>
                            </DataGridTextColumn.ElementStyle>
                            <DataGridTextColumn.EditingElementStyle>
                                <Style TargetType="TextBox">
                                    <Setter Property="TextWrapping"
                                            Value="Wrap" />
                                    <Setter Property="AcceptsReturn"
                                            Value="true" />
                                </Style>
                            </DataGridTextColumn.EditingElementStyle>
                        </DataGridTextColumn>
                    </DataGrid.Columns>-->
                </DataGrid>
            </Grid>
        </StackPanel>
    </DataTemplate>

</ResourceDictionary>